<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<title>客户资源管理系统_系统管理员</title>
    <base href="<%=basePath%>">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>css/bootstrap.css">
	<script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  </head>
  		
  <body>
  	<div class="container" style="width:960px;margin:auto;height:100px;margin-top:10px">
		<div style="float:left" >
			<h2 class="text-muted">欢迎使用名片管理系统</h2>
		</div>
		<div style="float:right;margin-top:50px;margin-right:10px">
			<ul class="nav nav-pills">
				<li><p>当前用户：管理员&nbsp;&nbsp;<a href="servlet/LogoutServlet" >退出</a></p></li>
			</ul>
		</div>
	</div><hr width="960px"/>
	<br/>
	<div class="container" style="width:960px;">
		<div style="width:20%;float:left">
		
			<button class="flip1 btn btn-primary" style="width:60%">用户管理</button>
			<br/><br/>
			<script type="text/javascript"> 
				$(document).ready(function(){
					$(".flip1").click(function(){
    					$(".panel1").slideToggle("slow");
 					 });
				});
			</script>
			
			<div class="panel1" style="display:none">
				<button type="button" id="addbtn" class="btn btn-primary" style="float:right;margin-right:40px">添加用户</button><br/><br/>
				<button type="button" id="searchbtn" class="btn btn-primary" style="float:right;margin-right:40px;margin-bottom:30px">查找用户</button>
			</div>
			<br/>
			<button class="flip2 btn btn-primary" style="width:60%"> 部门管理</button>
			<br/><br/>
			<script type="text/javascript"> 
				$(document).ready(function(){
					$(".flip2").click(function(){
    					$(".panel2").slideToggle("slow");
 					 });
				});
			</script>
			<div class="panel2" style="display:none">
				<button type="button" id="addcmpbtn" class="btn btn-primary" style="float:right;margin-right:40px">部门添加</button><br/><br/>
				<button type="button" id="searchcmpbtn" class="btn btn-primary" style="float:right;margin-right:40px">查找部门</button>
			</div>
		
		</div>
		
		<div class="container" style="width:80%;float:right">
		
			<iframe id="fra" src="<%=basePath %>servlet/SearchUserServlet" frameborder="0" style="width:100%;height:450px">
			
			</iframe>
			<script type="text/javascript">
				$(function(){
					 $("#addbtn").click(function(){
						$('#fra').prop('src','<%=basePath%>servlet/AddUserServlet');
					}); 
					$("#searchbtn").click(function(){
						$('#fra').prop('src','<%=basePath%>servlet/SearchUserServlet');
					});
					$("#addcmpbtn").click(function(){
						$('#fra').prop('src','<%=basePath%>gxr/admin_super_cmp_add.jsp');
					});
					$("#searchcmpbtn").click(function(){
						$('#fra').prop('src','<%=basePath%>servlet/SearchCmpServlet');
					});
				});
			</script>
		</div>
		<hr width="960px"/>
	</div>
  </body>
				
</html>
